home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
gnuish
/
flex251s
/
makefile.in
< prev
next >
Wrap
Makefile
|
1995-03-20
|
7KB
|
250 lines
# @(#) $Header: /home/daffy/u0/vern/flex/RCS/Makefile.in,v 1.41 95/03/20 14:02:49 vern Exp $ (LBL)
# If your version of "make" does not define $(MAKE), comment in the
# definition of "MAKE" below. (You only need to do this if you intend
# to do "make bigcheck" or "make dist".)
# MAKE = make
# Possible values for DEFS:
#
# For flex to always generate 8-bit scanners, add "-DDEFAULT_CSIZE=256"
# to DEFS.
#
# For Vax/VMS, add "-DVMS" to DEFS.
#
# For MS-DOS, add "-DMS_DOS" to DEFS. See the directory MISC/MSDOS for
# additional info.
CFLAGS = @CFLAGS@
DEFS = @DEFS@
LDFLAGS =
LIBS = @LIBS@
# Installation targeting. Files will be installed under the tree
# rooted at prefix. flex will be installed in bindir, libfl.a in
# libdir, FlexLexer.h will be installed in includedir, and the manual
# pages will be installed in mandir with extension manext.
#
# Raw, unformatted troff source will be installed if INSTALLMAN=man,
# nroff preformatted versions will be installed if INSTALLMAN=cat.
prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
includedir = $(prefix)/include
manext = 1
mandir = $(prefix)/man/man$(manext)
# You can define this to be "lex" if you want to replace lex at your site.
FLEX = flex
INSTALLMAN = man
SHELL = /bin/sh
srcdir = @srcdir@
VPATH = @srcdir@
LN_S = @LN_S@
YACC = @YACC@
CC = @CC@
AR = ar
RANLIB = @RANLIB@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
# You normally do not need to modify anything below this point.
# ------------------------------------------------------------
CPPFLAGS = -I. -I$(srcdir)
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
HEADERS = flexdef.h version.h
SOURCES = ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.y \
scan.l skel.c sym.c tblcmp.c yylex.c
OBJECTS = ccl.o dfa.o ecs.o gen.o main.o misc.o nfa.o parse.o \
scan.o skel.o sym.o tblcmp.o yylex.o @ALLOCA@
LIBSRCS = libmain.c libyywrap.c
LIBOBJS = libmain.o libyywrap.o
LINTSRCS = ccl.c dfa.c ecs.c gen.c main.c misc.c nfa.c parse.c \
scan.c skel.c sym.c tblcmp.c yylex.c
DISTFILES = README NEWS COPYING INSTALL FlexLexer.h \
configure.in conf.in Makefile.in mkskel.sh flex.skl \
$(HEADERS) $(SOURCES) $(LIBSRCS) MISC \
flex.1 scan.c install.sh mkinstalldirs configure
DIST_NAME = flex
# which "flex" to use to generate scan.c from scan.l
FLEX_EXEC = ./$(FLEX)
FLEX_FLAGS = -t $(PERF_REPORT)
COMPRESSION =
PERF_REPORT = -p
FLEXLIB = libfl.a
all: $(FLEX)
$(FLEX): .bootstrap $(OBJECTS) $(FLEXLIB)
$(CC) $(CFLAGS) -o $(FLEX) $(LDFLAGS) $(OBJECTS) $(FLEXLIB) $(LIBS)
.bootstrap: initscan.c
@rm -f scan.c
cp $(srcdir)/initscan.c scan.c
touch .bootstrap
parse.c: parse.y
$(YACC) -d $(srcdir)/parse.y
@sed '/extern char.*malloc/d' <y.tab.c >parse.tmp
@mv parse.tmp parse.c
@mv y.tab.h parse.h
@rm -f y.tab.c
parse.h: parse.c
scan.c: scan.l
$(FLEX_EXEC) $(FLEX_FLAGS) $(COMPRESSION) $(srcdir)/scan.l >scan.c
@sed s,\"$(srcdir)/scan.l\",\"scan.l\", <scan.c >scan.tmp
@mv scan.tmp scan.c
scan.o: scan.c parse.h flexdef.h config.h
yylex.o: yylex.c parse.h flexdef.h config.h
skel.c: flex.skl mkskel.sh
$(SHELL) $(srcdir)/mkskel.sh $(srcdir)/flex.skl >skel.c
main.o: main.c flexdef.h config.h version.h
ccl.o: ccl.c flexdef.h config.h
dfa.o: dfa.c flexdef.h config.h
ecs.o: ecs.c flexdef.h config.h
gen.o: gen.c flexdef.h config.h
misc.o: misc.c flexdef.h config.h
nfa.o: nfa.c flexdef.h config.h
parse.o: parse.c flexdef.h config.h
skel.o: skel.c flexdef.h config.h
sym.o: sym.c flexdef.h config.h
tblcmp.o: tblcmp.c flexdef.h config.h
alloca.o: alloca.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c -Dxmalloc=yy_flex_xmalloc alloca.c
alloca.c: $(srcdir)/MISC/alloca.c
@rm -f alloca.c
cp $(srcdir)/MISC/alloca.c .
test: check
check: $(FLEX)
$(FLEX_EXEC) $(FLEX_FLAGS) $(COMPRESSION) $(srcdir)/scan.l \
| sed s,\"$(srcdir)/scan.l\",\"scan.l\", \
| diff scan.c -
@echo "Check successful, using COMPRESSION=\"$(COMPRESSION)\""
bigcheck:
rm -f scan.c ; $(MAKE) COMPRESSION="-C" check
rm -f scan.c ; $(MAKE) COMPRESSION="-Ce" check
rm -f scan.c ; $(MAKE) COMPRESSION="-Cm" check
rm -f scan.c ; $(MAKE) COMPRESSION="-Cfea" check
rm -f scan.c ; $(MAKE) COMPRESSION="-CFer" check
rm -f scan.c ; $(MAKE) COMPRESSION="-l" PERF_REPORT="" check
rm -f scan.c ; $(MAKE)
@echo "All checks successful"
$(FLEXLIB): $(LIBOBJS)
$(AR) cru $(FLEXLIB) $(LIBOBJS)
-$(RANLIB) $(FLEXLIB)
$(FLEX).man: flex.1
cd $(srcdir); nroff -man flex.1 >$(FLEX).man
install: $(FLEX) $(FLEXLIB) installdirs install.$(INSTALLMAN)
$(INSTALL_PROGRAM) $(FLEX) $(bindir)/$(FLEX)
@rm -f $(bindir)/$(FLEX)++
cd $(bindir); $(LN_S) $(FLEX) $(FLEX)++
$(INSTALL_DATA) $(FLEXLIB) $(libdir)/libfl.a
-cd $(libdir); $(RANLIB) libfl.a
$(INSTALL_DATA) $(srcdir)/FlexLexer.h $(includedir)/FlexLexer.h
# Note, the following rules delete any vestigial flexdoc installed
# for a prior flex release.
install.man: flex.1
rm -f $(mandir)/$(FLEX)doc.$(manext)
$(INSTALL_DATA) $(srcdir)/flex.1 $(mandir)/$(FLEX).$(manext)
install.cat: $(FLEX).man
rm -f $(mandir)/$(FLEX)doc.$(manext)
$(INSTALL_DATA) $(srcdir)/$(FLEX).man $(mandir)/$(FLEX).$(manext)
installdirs:
$(SHELL) $(srcdir)/mkinstalldirs \
$(bindir) $(libdir) $(includedir) $(mandir)
uninstall:
rm -f $(bindir)/$(FLEX) $(bindir)/$(FLEX)++
rm -f $(libdir)/libfl.a
rm -f $(includedir)/FlexLexer.h
rm -f $(mandir)/$(FLEX).$(manext) $(mandir)/$(FLEX)doc.$(manext)
tags: $(SOURCES)
ctags $(SOURCES)
TAGS: $(SOURCES)
etags $(SOURCES)
lint: $(LINTSRCS)
lint -Dconst= $(LINTSRCS) > flex.lint
gcc-lint: $(LINTSRCS)
gcc -Dlint -Wall $(LINTSRCS) >flex.gcc-lint 2>&1
mostlyclean:
rm -f a.out *.bak core errs scan.tmp
clean: mostlyclean
rm -f parse.c parse.h *.o alloca.c *.lint lex.yy.c lex.yy.cc $(FLEXLIB)
distclean: clean
rm -f .bootstrap $(FLEX) scan.c tags TAGS Makefile config.status \
config.h
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f $(FLEX).man skel.c flex*.tar.gz flex*.tar.Z
dist: $(FLEX) $(DISTFILES) parse.c parse.h $(srcdir)/$(FLEX).man
$(MAKE) DIST_NAME=flex-`sed <version.h 's/[^"]*"//' | sed 's/"//'` dist2
dist2:
@rm -rf $(DIST_NAME)
@rm -f $(DIST_NAME).tar $(DIST_NAME).tar.Z $(DIST_NAME).tar.gz
@mkdir $(DIST_NAME)
tar cf - $(DISTFILES) | (cd $(DIST_NAME); tar xfB -)
@mv $(DIST_NAME)/scan.c $(DIST_NAME)/initscan.c
@chmod 444 $(DIST_NAME)/initscan.c
@chmod +w $(DIST_NAME)/Makefile.in
@cp parse.c parse.h $(DIST_NAME)/MISC
@col -b <$(srcdir)/$(FLEX).man >$(DIST_NAME)/MISC/flex.man
tar chf $(DIST_NAME).tar $(DIST_NAME)
compress <$(DIST_NAME).tar >$(DIST_NAME).tar.Z
gzip <$(DIST_NAME).tar >$(DIST_NAME).tar.gz
@rm $(DIST_NAME).tar
Makefile: $(srcdir)/Makefile.in config.status
$(SHELL) config.status
config.status: configure
$(SHELL) config.status --recheck
configure: configure.in
cd $(srcdir); autoconf
config.h: conf.in config.status
# Prevent GNU make v3 from overflowing arg limit on SysV.
.NOEXPORT: